package com.spring.activemq;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * 消费者消息监听器
 * @author bianqiang
 *
 */
public class CustomerMessageListener implements MessageListener{

	public void onMessage(Message message) {
		TextMessage textMessage=(TextMessage) message;
		try {
			System.out.println("接收到的消息为："+textMessage.getText());
		} catch (JMSException e) {
			e.printStackTrace();
		}
	}
}
